package com.ourteam.product.requirement.domain;
/**
 * Template Name : DTO数据对象 Template Version : 1 Template Last Modfiy Date : Fri Nov 30 16:49:33 CST
 * 2018 Auto Generate Date : 2018-12-11 15:24:37 Warning ! This file will be overwrite when
 * regenerate !
 */
import java.util.HashMap;
import java.util.Map;
import net.dao.IDataPopulateCallback;
import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

public class ProductRequirementRelateBean implements java.io.Serializable {

  private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

  private com.ourteam.product.requirement.dao.ProductRequirementRelate productRequirementRelate;

  protected BeanMap getBeanMap() {

    return new BeanMap(productRequirementRelate);
  }

  static {
    mappedDaoFields.put("id", com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.Id);

    mappedDaoFields.put(
        "requirementId",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RequirementId);

    mappedDaoFields.put(
        "relatedRequirementId",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RelatedRequirementId);

    mappedDaoFields.put(
        "relatedType",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RelatedType);

    mappedDaoFields.put(
        "status", com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.Status);

    mappedDaoFields.put(
        "remarks", com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.Remarks);

    mappedDaoFields.put(
        "requestCode",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RequestCode);

    mappedDaoFields.put(
        "requestName",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RequestName);

    mappedDaoFields.put(
        "requestContent",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RequestContent);

    mappedDaoFields.put(
        "requestLevel",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RequestLevel);

    mappedDaoFields.put(
        "relatedRequestCode",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RelatedRequestCode);

    mappedDaoFields.put(
        "relatedRequestName",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RelatedRequestName);

    mappedDaoFields.put(
        "relatedRequestContent",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RelatedRequestContent);

    mappedDaoFields.put(
        "relatedRequestLevel",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RelatedRequestLevel);

    mappedDaoFields.put(
        "relatedRequestStatus",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RelatedRequestStatus);

    mappedDaoFields.put(
        "requestStatus",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RequestStatus);

    mappedDaoFields.put(
        "relatedRequestType",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RelatedRequestType);

    mappedDaoFields.put(
        "requestType",
        com.ourteam.product.requirement.dao.IProductRequirementRelateDAO.RequestType);
  }

  public static String getMappedDAOField(String aAttrName) {
    return mappedDaoFields.get(aAttrName);
  }

  public ProductRequirementRelateBean() {
    super();

    this.productRequirementRelate =
        new com.ourteam.product.requirement.dao.ProductRequirementRelate();
  }

  public ProductRequirementRelateBean(
      com.ourteam.product.requirement.dao.ProductRequirementRelate productRequirementRelate) {
    super();

    this.productRequirementRelate = productRequirementRelate;
  }

  public com.ourteam.product.requirement.dao.ProductRequirementRelate
      convertToProductRequirementRelate() {
    return this.productRequirementRelate;
  }

  public com.ourteam.product.requirement.dao.ProductRequirementRelate convertTo() {
    return this.productRequirementRelate;
  }

  /**
   * Get id
   *
   * @return long
   */
  public long getId() {
    return (long) this.productRequirementRelate.getId();
  }

  /**
   * Set id
   *
   * @parameter long
   */
  public void setId(long id) {

    this.productRequirementRelate.setId(id);
  }

  /**
   * Get requirementId
   *
   * @return long
   */
  public long getRequirementId() {
    return (long) this.productRequirementRelate.getRequirementId();
  }

  /**
   * Set requirementId
   *
   * @parameter long
   */
  public void setRequirementId(long requirementId) {

    this.productRequirementRelate.setRequirementId(requirementId);
  }

  /**
   * Get relatedRequirementId
   *
   * @return long
   */
  public long getRelatedRequirementId() {
    return (long) this.productRequirementRelate.getRelatedRequirementId();
  }

  /**
   * Set relatedRequirementId
   *
   * @parameter long
   */
  public void setRelatedRequirementId(long relatedRequirementId) {

    this.productRequirementRelate.setRelatedRequirementId(relatedRequirementId);
  }

  /**
   * Get relatedType
   *
   * @return String
   */
  public String getRelatedType() {
    return (String) this.productRequirementRelate.getRelatedType();
  }

  /**
   * Set relatedType
   *
   * @parameter String
   */
  public void setRelatedType(String relatedType) {

    this.productRequirementRelate.setRelatedType(relatedType);
  }

  /**
   * Get status
   *
   * @return String
   */
  public String getStatus() {
    return (String) this.productRequirementRelate.getStatus();
  }

  /**
   * Set status
   *
   * @parameter String
   */
  public void setStatus(String status) {

    this.productRequirementRelate.setStatus(status);
  }

  /**
   * Get remarks
   *
   * @return String
   */
  public String getRemarks() {
    return (String) this.productRequirementRelate.getRemarks();
  }

  /**
   * Set remarks
   *
   * @parameter String
   */
  public void setRemarks(String remarks) {

    this.productRequirementRelate.setRemarks(remarks);
  }

  /**
   * Get requestCode
   *
   * @return String
   */
  public String getRequestCode() {

    return (String) this.productRequirementRelate.getRequestCode();
  }

  /**
   * Get requestName
   *
   * @return String
   */
  public String getRequestName() {

    return (String) this.productRequirementRelate.getRequestName();
  }

  /**
   * Get requestContent
   *
   * @return String
   */
  public String getRequestContent() {

    return (String) this.productRequirementRelate.getRequestContent();
  }

  /**
   * Get requestLevel
   *
   * @return String
   */
  public String getRequestLevel() {

    return (String) this.productRequirementRelate.getRequestLevel();
  }

  /**
   * Get relatedRequestCode
   *
   * @return String
   */
  public String getRelatedRequestCode() {

    return (String) this.productRequirementRelate.getRelatedRequestCode();
  }

  /**
   * Get relatedRequestName
   *
   * @return String
   */
  public String getRelatedRequestName() {

    return (String) this.productRequirementRelate.getRelatedRequestName();
  }

  /**
   * Get relatedRequestContent
   *
   * @return String
   */
  public String getRelatedRequestContent() {

    return (String) this.productRequirementRelate.getRelatedRequestContent();
  }

  /**
   * Get relatedRequestLevel
   *
   * @return String
   */
  public String getRelatedRequestLevel() {

    return (String) this.productRequirementRelate.getRelatedRequestLevel();
  }

  /**
   * Get relatedRequestStatus
   *
   * @return String
   */
  public String getRelatedRequestStatus() {

    return (String) this.productRequirementRelate.getRelatedRequestStatus();
  }

  /**
   * Get requestStatus
   *
   * @return String
   */
  public String getRequestStatus() {

    return (String) this.productRequirementRelate.getRequestStatus();
  }

  /**
   * Get relatedRequestType
   *
   * @return String
   */
  public String getRelatedRequestType() {

    return (String) this.productRequirementRelate.getRelatedRequestType();
  }

  /**
   * Get requestType
   *
   * @return String
   */
  public String getRequestType() {

    return (String) this.productRequirementRelate.getRequestType();
  }

  public int hashCode() {
    return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
  }

  public boolean equals(Object obj) {
    if (obj == null) {
      return false;
    } // end if

    if ((obj instanceof ProductRequirementRelateBean) == false) {
      return false;
    } // end if

    ProductRequirementRelateBean other = (ProductRequirementRelateBean) obj;

    boolean isEqual = false;

    com.ourteam.product.requirement.dao.ProductRequirementRelate tempProductRequirementRelate =
        other.convertToProductRequirementRelate();

    if (tempProductRequirementRelate == null || this.productRequirementRelate == null) {
      isEqual = false;
    } else if (tempProductRequirementRelate == this.productRequirementRelate
        || tempProductRequirementRelate.equals(this.productRequirementRelate)) {
      isEqual = true;
    } else {
      isEqual = false;
    }

    return isEqual;
  }

  public static ProductRequirementRelateBean[] toArray(
      com.ourteam.product.requirement.dao.ProductRequirementRelate[] aProductRequirementRelates) {

    return toArray(aProductRequirementRelates, null);
  }

  public static ProductRequirementRelateBean[] toArray(
      com.ourteam.product.requirement.dao.ProductRequirementRelate[] aProductRequirementRelates,
      IDataPopulateCallback aCallBack) {

    if (ArrayUtils.isEmpty(aProductRequirementRelates)) {
      return new ProductRequirementRelateBean[0];
    }

    int length = aProductRequirementRelates.length;

    ProductRequirementRelateBean[] beans = new ProductRequirementRelateBean[length];

    for (int i = 0; i < length; i++) {
      beans[i] = new ProductRequirementRelateBean(aProductRequirementRelates[i]);
      if (aCallBack != null) {
        aCallBack.populate(beans[i], new Object[] {aProductRequirementRelates[i]});
      }
    }

    return beans;
  }
}
